﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ZK.YCGLRD_TransManage.Test
{
    public partial class 海康测试 : Form
    {

        public HardWareHelp.Camera cameraQ;
        public 海康测试()
        {
            InitializeComponent();
            {
                Common.HaredWareCommonM cameraScalesQ = Common.IConfig.GetSetCameraScalesQ;
                Common.CameraModel cameraModelQ = new Common.CameraModel()
                {
                    Name = cameraScalesQ.Name,
                    Ip = cameraScalesQ.Ip,
                    Port = Convert.ToInt32(cameraScalesQ.Port),
                    PassWord = cameraScalesQ.PassWord,
                    UserName = cameraScalesQ.UserName
                };
                cameraQ = new HardWareHelp.Camera(cameraModelQ);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            cameraQ.ManualOne(pictureBox1);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            cameraQ.BarrierGateControl(1);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            cameraQ.BarrierGateControl(0);
        }
    }
}
